import { ProDescriptions } from "@ant-design/pro-components";
import { Alert } from "antd";
import { useEffect, useState } from "react";

export default function Index(props: any) {
    const [oss, setoss] = useState('')
    useEffect(() => {
        setoss(props.InitialValue.oss)
    }, [])

    return (
        <div>
            <Alert
                message="说明"
                description={`请在编辑器中输入您的 oss 配置，并添加 type 字段区分${oss}`}
                type="info"
                showIcon
            />
            <ProDescriptions.Item label="JSON 代码块" valueType="jsonCode">
                {`{
                  "compilerOptions": {
                  "target": "esnext",
                  "moduleResolution": "node",
                  "jsx": "preserve",
                  "esModuleInterop": true,
                  "experimentalDecorators": true,
                  "strict": true,
                  "forceConsistentCasingInFileNames": true,
                  "noImplicitReturns": true,
                  "suppressImplicitAnyIndexErrors": true,
                  "declaration": true,
                  "skipLibCheck": true
                  },
                  "include": ["**/src", "**/docs", "scripts", "**/demo", ".eslintrc.js"]
                  }
                 `}
            </ProDescriptions.Item>
        </div>
    )
}